package com.zytj.rs.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.zytj.rs.dao.IUsersDao;
import com.zytj.rs.model.Users;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "管理员")
@RestController
@RequestMapping("/users")
public class UsersController {

	@Resource
	private IUsersDao usersDao;
	
	@ApiOperation(value = "管理员登录",notes = "管理员登录")
	@PostMapping("login")
	public Users longin(String name,String password) {
		return usersDao.findByNameAndPassword(name,password);
	}
	
}
